package com.example.zyflutter

import android.os.Bundle
import com.example.zyflutter.plugin.MyPlugin
import com.example.zyflutter.plugin.SampleBridgeBasicMethodChannelPlugin
import com.example.zyflutter.plugin.SampleBridgeEventChannelPlugin
import com.example.zyflutter.plugin.SampleBridgeMethodChannelPlugin
import com.example.zyflutter.utils.LogUtils
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine

class MainActivity : FlutterActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    /**
     * 在这里进入插件的注册
     */
    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        super.configureFlutterEngine(flutterEngine)
        LogUtils.logE("configureFlutterEngine")
        flutterEngine.plugins.add(MyPlugin())
        flutterEngine.plugins.add(SampleBridgeMethodChannelPlugin())
        flutterEngine.plugins.add(SampleBridgeEventChannelPlugin())
        flutterEngine.plugins.add(SampleBridgeBasicMethodChannelPlugin())
    }
}
